% TEST_ID: LANG-EXPAND-0121
% CATEGORY: language/string
% 测试 string 的字串查找

function test_string_strfind()
x = 'hello';
y = 'he';
z = strfind(x, y);
assert(z == 1);

x = {'hello', 'world'};
y = {'he'};
z = strfind(x, y);
z1 = z{1};
z2 = isempty(z{2});
assert(z1 == 1);
assert(z2);

x = 'sss';
y = 'ss';
z = strfind(x, y);
assert(z(1) == 1);
assert(z(2) == 2);
